<h1>Listing employees</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Cpf</th>
    <th>Birthdate</th>
    <th>Type</th>
  </tr>

<% @employees.each do |employee| %>
  <tr>
    <td><%=h employee.name %></td>
    <td><%=h employee.cpf %></td>
    <td><%=h employee.birthdate %></td>
    <td><%=h employee.etype %></td>
    <td><%= link_to 'Show', employee %></td>
    <td><%= link_to 'Edit', edit_employee_path(employee) %></td>
    <td><%= link_to 'Destroy', employee, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New employee', new_employee_path %>
<%= link_to 'Back', :controller => "home#index" %>
